import request from '@/utils/request'

export function getInfo(url, params) {
  return request({
    url: '/api/user/detail' + url,
    method: 'post',
    params
  })
}

export function getMenu(url, method = 'post', data, type) {
  let object = {
    url: '/api/menu' + url,
    method: method,
  }
  type ? object.params = data : object.data = data;
  return request(object)
}